﻿using System;
using System.Collections.Generic;
using System.Text;
using WebSocketCore.Domain.Entities;

namespace WebSocketCore.Domain.Impl
{
    public class MessageManager : IMessageManager
    {
        public MessageEntity CreateMsg(string from, string msg)
        {
            return new MessageEntity() { From = from, Message = msg };
        }

        public MessageEntity UserLogIn(string from,string roomName)
        {
            return new MessageEntity() { From =$"用户[{from}]", Message = $"进入了房间[{roomName}]" };
        }

        public MessageEntity UserLogOut(string from)
        {
            return new MessageEntity() { From = $"用户[{from}]", Message = "退出了房间" };
        }
    }
}
